import Rectangle from './Rectangle.js';

const skyDom = document.querySelector('.sky');
const skyDomStyle = getComputedStyle(skyDom);
const skyWidth = parseInt(skyDomStyle.width);
const skyHeight = parseInt(skyDomStyle.height);

export default class Sky extends Rectangle {
  constructor() {
    super(0, 0, skyWidth, skyHeight, -150, 0, skyDom);
  }

  onMove() {
    if (this.left <= -skyWidth / 2) {
      this.left = 0;
    }
  }
}
